define(function (require, exports, module) {
    
	WebPDF.DrawingAnnotPluginName = "DrawingAnnotPlugin";
	
	var DrawingAnnotToolHandler = require("./DrawingAnnotToolHandler.js");
	var DrawingAnnotHandler = require("./DrawingAnnotHandler.js");
	require("./AnnotHandleManager.js");
    
	WebPDF.DrawingAnnotPlugin = function (readerApp, baseAnnotPlugin) {
        var   _readerApp = readerApp,
        	  _baseAnnotPlugin = baseAnnotPlugin,             
        	  _annotHandlerArray = [],
              _self = this;
     
        this.getPluginName = function () {
            return WebPDF.DrawingAnnotPluginName;
        };
        
        
        this.onRegister = function () {
           
        };
      
        //模块初始化;
        this.init = function () {          
//        	_drawingAnnotTool = new DrawingAnnotToolHandler(_baseAnnotPlugin);
//        	_readerApp.registerToolHandler(_drawingAnnotTool);
        	
        	//Add Annotation handler        
        	var annotHandler = new DrawingAnnotHandler(_readerApp, _self);
        	//_pAnnotPlugin.registerAnnotHandler(pAnnotHandler);
        	//_annotHandlerArray.push(pAnnotHandler);
        	
           // _self.CreateCmdAndBtn();
        };
        
        this.unload = function () {
        };

        this.GetReaderApp = function () {
            return _readerApp;
        };     
    };

    exports.createPlugin = function (readerApp) {
        var baseAnnotPlugin = readerApp.getPluginByName(WebPDF.BASEANNOT_PLUGIN_NAME);
        var drawingAnnotPlugin = new WebPDF.DrawingAnnotPlugin(readerApp, baseAnnotPlugin);
        return drawingAnnotPlugin;
    };
	
});

